package com.pizza.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;

import com.pizza.abstrait.*;

/**
 * Class Commande, entite du modele.
 *
 */
public class Commande extends AbstractCommande implements Serializable {

	
	public Commande(Date date) {
		super();
		this.id = -1;
		this.client = null;
		this.remise = null;
		this.total = 0;
		this.etat = "";
		this.tva = 0;
		this.date = date;
		this.livraison = false;
		adresseLivraison = null;
		pizzas = new ArrayList<AbstractCommandeLignePizza>();
		articles = new ArrayList<AbstractCommandeLigneArticle>();
		formules = new ArrayList<AbstractCommandeLigneFormule>();
	}
	
	public Commande(AbstractClient client, Remise remise, AbstractAdresse adresseLivraison, float total, String etat, float tva, Date date, boolean livraison, ArrayList<AbstractCommandeLignePizza> pizzas, ArrayList<AbstractCommandeLigneArticle> articles, ArrayList<AbstractCommandeLigneFormule> formules) {
		super();
		this.client = client;
		this.remise = remise;
		this.adresseLivraison = adresseLivraison;
		this.total = total;
		this.etat = etat;
		this.tva = tva;
		this.date = date;
		this.livraison = livraison;
		this.pizzas = pizzas;
		this.articles = articles;
		this.formules = formules;
	}
	
	public Commande(int id, Client client, Remise remise, Adresse adresseLivraison, float total, String etat, float tva, Date date, boolean livraison) {
		super();
		this.id = id;
		this.client = client;
		this.remise = remise;
		this.adresseLivraison = adresseLivraison;
		this.total = total;
		this.etat = etat;
		this.tva = tva;
		this.date = date;
		this.livraison = livraison;
		this.pizzas = new ArrayList<AbstractCommandeLignePizza>();
		this.articles = new ArrayList<AbstractCommandeLigneArticle>();
		this.formules = new ArrayList<AbstractCommandeLigneFormule>();
	}
		
}
